local slashReduceSkill = fk.CreateSkill {
  name = "slashReduceSkill",
  tags = { Skill.Compulsory, },
}


slashReduceSkill:addEffect(fk.TurnEnd, {
  anim_type = "negative",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(slashReduceSkill.name) and target == player
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:handleAddLoseSkills(player, "-slashReduceSkill", nil, false)
  end,
})

slashReduceSkill:addEffect("targetmod", {
  name = "#slashReduceModSkill",
  residue_func = function(self, player, skill, scope)
    if player:hasSkill(slashReduceSkill.name) and skill.trueName == "slash_skill"
      and scope == Player.HistoryPhase then
      return -1
    end
  end,
})


return slashReduceSkill